Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support all merge methods #89

Merged
merged 1 commit into from
Jan 9, 2024
Merged

support all merge methods #89

merged 1 commit into from
Jan 9, 2024

Conversation

robandpdx
Copy link
Collaborator

@robandpdx robandpdx commented Dec 19, 2023

This pull request primarily focuses on enhancing the merge functionality in the app.js file and updating the tests in the test.js file to accommodate these changes. The key changes include the addition of a dynamic merge method selection based on the repository's settings and the corresponding updates in the test cases to validate these changes.

Merge method enhancement:

  • app.js: Added a dynamic merge method selection logic. Based on the repository's settings, it now chooses between 'merge', 'squash', or 'rebase' as the merge method. Previously, it defaulted to use 'merge' as the merge method.

Test case updates:

  • test.js: Updated the test payload to include allow_merge_commit, allow_squash_merge, and allow_rebase_merge properties to mimic the repository's settings. This was done in the payloadPrLabeled and payloadPrLabeledByBot objects. [1] [2]
  • test.js: Updated the after.each test cleanup method to reset the merge settings.
  • test.js: Updated and added new test cases to validate the dynamic merge method selection logic. These tests ensure that the correct merge method ('merge', 'squash', or 'rebase') is used based on the repository's settings.

This closes #13

Copy link


=============================== Coverage summary ===============================
Statements   : 100% ( 150/150 )
Branches     : 100% ( 88/88 )
Functions    : 100% ( 27/27 )
Lines        : 100% ( 149/149 )
================================================================================

@robandpdx robandpdx merged commit 370507b into main Jan 9, 2024
2 checks passed
@robandpdx robandpdx deleted the support-merge-methods branch January 9, 2024 02:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support merge_method options
1 participant